<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>骨医快线</title>
    <link href="../../../css/mui.plus.css" rel="stylesheet"/>
    <style type="text/css">
    	.no-padding {
    		padding: 0;
    	}
    	.btn-area {
    		padding: 80px 30px  50px;
    	}
    	.btn-area>button {
    		padding: 10px 0;
    	}
    	.mui-input-group, .mui-input-group input {
    		font-size: 15px;
    	}
    </style>
</head>
<body>
	<header class="mui-bar mui-bar-nav oe-pri-bar">
	    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
	    <h1 class="mui-title">兑换积分</h1>
	</header>
	
	<div class="mui-content">
		<form class="mui-input-group">
		    <div class="mui-input-row">
		        <label>支付宝账户 :</label>
		        <input type="text" id="accountIpt" class="mui-input-clear" placeholder="请输入" >
		    </div>
		</form>
		
	    <div class="btn-area">
	    	<button type="button" id="btnNext" class="mui-btn mui-btn-primary mui-btn-block">下一步</button>
	    </div>
		
	</div>
	
    <script src="../../../js/mui.min.js"></script>
    <script src="../../../js/app.js"></script>
    <script></script>
    <script>
    	;(function($, a){
    		var wv,
    			transData = {
				dr_id: a.storage.getUserId(),
				points_amount: '',
				withdrawals_account: '',
				withdrawals_mode: ''
    		},
    		accountIpt = document.getElementById("accountIpt");
    		
            $.plusReady(function(){
            	wv = plus.webview.currentWebview();
            	transData.points_amount = wv.amount;
            	transData.withdrawals_mode = wv.payMode;
            });
			
			$('.mui-content').on('tap', '#btnNext', function(){
            	transData.withdrawals_account = accountIpt.value;
            	console.log(JSON.stringify(transData))
            	for(var i in transData){
            		if(transData[i] === '')return $.toast('请将信息填写完整');
            	}
            	$.openWindow({
            		url: 'result.html',
            		waiting: {
            			autoShow: false
            		},
            		extras: {
            			commitData: transData
            		}
            	});
            })
    		
    	}(mui, app));
    </script>
</body>
</html>